﻿<phone:PhoneApplicationPage
    x:Class="BudgetManager.SettingsDetails"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit" 
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

    <!--LayoutRoot contains the root grid where all other page content is placed-->

    <Grid x:Name="LayoutRoot">
        <phone:Panorama Name="settingsPage"  FontSize="10" Title="{Binding Path=LocalizedResources.SettingsHeaderText, Source={StaticResource LocalizedStrings}}">
            <!--Panorama item one-->
            <phone:PanoramaItem Header="{Binding Path=LocalizedResources.SetLimitText, Source={StaticResource LocalizedStrings}}">
                <ScrollViewer>
                    <StackPanel>

                        <TextBlock Text="{Binding Path=LocalizedResources.SettingsDefinitionText, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style }"></TextBlock>
                        <toolkit:ToggleSwitch Name="toggleLimit" Header="{Binding Path=LocalizedResources.SetLimitText, Source={StaticResource LocalizedStrings}}" Tap="toggleLimitSwitch"></toolkit:ToggleSwitch>
                        <Button Width="300" HorizontalAlignment="Left" Click="configureBalance" Visibility="Collapsed" Name="btnConfigure" Content="{Binding Path=LocalizedResources.CfgBalanceBtnText, Source={StaticResource LocalizedStrings}}"></Button>
                            <StackPanel Name="cfgBalance" Visibility="Collapsed">
                                <TextBlock Style="{StaticResource PhoneTextNormalStyle}" HorizontalAlignment="Left"
                           Text="{Binding Path=LocalizedResources.AvailableBalanceText, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Top" Height="27"/>
                                <TextBox Name="txtAmount" InputScope="CurrencyAmount" ></TextBox>
                            <Button HorizontalAlignment="Center" VerticalAlignment="Center"  Click="saveLimit" Content="{Binding Path=LocalizedResources.SaveLimitBtnText, Source={StaticResource LocalizedStrings}}">
                                </Button>
                            </StackPanel>
                        <StackPanel Name="limitOnDateExpired" Visibility="Collapsed">
                            <TextBlock Text="{Binding Path=LocalizedResources.BalanceExpiredText, Source={StaticResource LocalizedStrings}}" TextWrapping="Wrap" Style="{StaticResource PhoneTextAccentStyle}"></TextBlock>

                            <Button Tap="emailReport" Content="{Binding Path=LocalizedResources.EmailBtnText, Source={StaticResource LocalizedStrings}}"></Button>
                        </StackPanel>
                    </StackPanel>
                </ScrollViewer>
            </phone:PanoramaItem>

            <!--Panorama item two-->
            <phone:PanoramaItem Header="{Binding Path=LocalizedResources.ProductPageHeader, Source={StaticResource LocalizedStrings}}">
                <StackPanel>

                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextAccentStyle}" Text="{Binding Path=LocalizedResources.AuthorText, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding Path=LocalizedResources.VersionText, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding Path=LocalizedResources.SupportedLangText, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding Path=LocalizedResources.Currencytext, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <TextBlock TextWrapping="Wrap" Style="{StaticResource PhoneTextTitle3Style}" Text="{Binding Path=LocalizedResources.AppDefinitionText, Source={StaticResource LocalizedStrings}}"></TextBlock>
                    <HyperlinkButton NavigateUri="https://mybudgetmanager.codeplex.com/" Content="{Binding Path=LocalizedResources.SourceCodeBaseLocationText, Source={StaticResource LocalizedStrings}}" TargetName="_blank"/>
                    <Button Click="reviewClicked" Content="{Binding LocalizedResources.ReviewAppText, Source={StaticResource LocalizedStrings}}" VerticalAlignment="Bottom"/>

                </StackPanel>
            </phone:PanoramaItem>
        </phone:Panorama>
    </Grid>

</phone:PhoneApplicationPage>